import Vue from 'vue';
import Router from 'vue-router';
import Layout from '@/views/layout/Layout';

Vue.use(Router);

export default new Router({
    routes:[
        {
            path:'/',
            name:'Home',
            redirect:'index',
            component:Layout,
            children:[
                {
                    path:'/index',
                    name:'Home',
                    component:()=>import('@/views/home'),
                    meta:{title:'Home'}
                }
            ]
        },
        {
            path:'/signin',
            name:'SignIn',
            component:()=>import('@/views/signin')
        },
        {
            path:'/info',
            component:Layout,
            children:[
                {
                    path:'/',
                    name:'Info',
                    component:()=>import('@/views/info')
                }
            ]
        },
        {
            path:'/news',
            component:Layout,
            children:[
                {
                    path:'/',
                    name:'News',
                    component:()=>import('@/views/news')
                }
            ]
        },
    ]
});